<template>
  <div>
    {{ money }}
    <div>
      <button v-on:click="money++">+1</button>
      <button v-on:click="addm">+10</button>

      <button @click="addMon(2)">+2</button>
      <button @click="addMon(300)">+300</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      money: 100,
    };
  },
  methods: {
    addm() {
      if (this.money >= 200) return;

      this.money += 10;
    },
    addMon(num) {
      this.money += num;
    },
  },
};
</script>

<style></style>
